//
//  ViewController.m
//  滚动 view
//
//  Created by passfeediOS on 2016/9/23.
//  Copyright © 2016年 passfeediOS. All rights reserved.
//

#import "ViewController.h"
#import "LHCollectionView.h"
@interface ViewController ()<collectionViewDidSelectItemAtIndexPathDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSMutableArray* array=[NSMutableArray arrayWithObjects:@"1",@"1",@"1",@"1",@"1", nil];
    
    LHCollectionView *v= [[LHCollectionView alloc]initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, 200) dataSourceArray:array showType:showTypeWithTag];
    v.delegate=self;
    [self.view addSubview:v];
    
    LHCollectionView *v1= [[LHCollectionView alloc]initWithFrame:CGRectMake(0, 240, self.view.frame.size.width, 200) dataSourceArray:array showType:showTypeWithBottomText];
    v1.delegate=self;
    [self.view addSubview:v1];
    
    LHCollectionView *v2= [[LHCollectionView alloc]initWithFrame:CGRectMake(0, 440, self.view.frame.size.width, 200) dataSourceArray:array showType:showTypeWithPageControl];
    v2.delegate=self;
    [self.view addSubview:v2];
    
    self.view.backgroundColor=[UIColor darkGrayColor];
}

-(void)lh_collectionViewDidSelectItemAtIndexPath:(NSInteger)index withData:(id)data
{
    NSLog(@"选中索引%ld,传回的数据%@",(long)index,data);

}


@end
